package com.hengaiw.model.dao.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class PotevioTariffExample implements Serializable {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private static final long serialVersionUID = 1L;

    private Integer limit;

    private Integer offset;

    public PotevioTariffExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria implements Serializable {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andTariff_idIsNull() {
            addCriterion("tariff_id is null");
            return (Criteria) this;
        }

        public Criteria andTariff_idIsNotNull() {
            addCriterion("tariff_id is not null");
            return (Criteria) this;
        }

        public Criteria andTariff_idEqualTo(Integer value) {
            addCriterion("tariff_id =", value, "tariff_id");
            return (Criteria) this;
        }

        public Criteria andTariff_idNotEqualTo(Integer value) {
            addCriterion("tariff_id <>", value, "tariff_id");
            return (Criteria) this;
        }

        public Criteria andTariff_idGreaterThan(Integer value) {
            addCriterion("tariff_id >", value, "tariff_id");
            return (Criteria) this;
        }

        public Criteria andTariff_idGreaterThanOrEqualTo(Integer value) {
            addCriterion("tariff_id >=", value, "tariff_id");
            return (Criteria) this;
        }

        public Criteria andTariff_idLessThan(Integer value) {
            addCriterion("tariff_id <", value, "tariff_id");
            return (Criteria) this;
        }

        public Criteria andTariff_idLessThanOrEqualTo(Integer value) {
            addCriterion("tariff_id <=", value, "tariff_id");
            return (Criteria) this;
        }

        public Criteria andTariff_idIn(List<Integer> values) {
            addCriterion("tariff_id in", values, "tariff_id");
            return (Criteria) this;
        }

        public Criteria andTariff_idNotIn(List<Integer> values) {
            addCriterion("tariff_id not in", values, "tariff_id");
            return (Criteria) this;
        }

        public Criteria andTariff_idBetween(Integer value1, Integer value2) {
            addCriterion("tariff_id between", value1, value2, "tariff_id");
            return (Criteria) this;
        }

        public Criteria andTariff_idNotBetween(Integer value1, Integer value2) {
            addCriterion("tariff_id not between", value1, value2, "tariff_id");
            return (Criteria) this;
        }

        public Criteria andTariff_valueIsNull() {
            addCriterion("tariff_value is null");
            return (Criteria) this;
        }

        public Criteria andTariff_valueIsNotNull() {
            addCriterion("tariff_value is not null");
            return (Criteria) this;
        }

        public Criteria andTariff_valueEqualTo(String value) {
            addCriterion("tariff_value =", value, "tariff_value");
            return (Criteria) this;
        }

        public Criteria andTariff_valueNotEqualTo(String value) {
            addCriterion("tariff_value <>", value, "tariff_value");
            return (Criteria) this;
        }

        public Criteria andTariff_valueGreaterThan(String value) {
            addCriterion("tariff_value >", value, "tariff_value");
            return (Criteria) this;
        }

        public Criteria andTariff_valueGreaterThanOrEqualTo(String value) {
            addCriterion("tariff_value >=", value, "tariff_value");
            return (Criteria) this;
        }

        public Criteria andTariff_valueLessThan(String value) {
            addCriterion("tariff_value <", value, "tariff_value");
            return (Criteria) this;
        }

        public Criteria andTariff_valueLessThanOrEqualTo(String value) {
            addCriterion("tariff_value <=", value, "tariff_value");
            return (Criteria) this;
        }

        public Criteria andTariff_valueLike(String value) {
            addCriterion("tariff_value like", value, "tariff_value");
            return (Criteria) this;
        }

        public Criteria andTariff_valueNotLike(String value) {
            addCriterion("tariff_value not like", value, "tariff_value");
            return (Criteria) this;
        }

        public Criteria andTariff_valueIn(List<String> values) {
            addCriterion("tariff_value in", values, "tariff_value");
            return (Criteria) this;
        }

        public Criteria andTariff_valueNotIn(List<String> values) {
            addCriterion("tariff_value not in", values, "tariff_value");
            return (Criteria) this;
        }

        public Criteria andTariff_valueBetween(String value1, String value2) {
            addCriterion("tariff_value between", value1, value2, "tariff_value");
            return (Criteria) this;
        }

        public Criteria andTariff_valueNotBetween(String value1, String value2) {
            addCriterion("tariff_value not between", value1, value2, "tariff_value");
            return (Criteria) this;
        }

        public Criteria andTariff_typeIsNull() {
            addCriterion("tariff_type is null");
            return (Criteria) this;
        }

        public Criteria andTariff_typeIsNotNull() {
            addCriterion("tariff_type is not null");
            return (Criteria) this;
        }

        public Criteria andTariff_typeEqualTo(String value) {
            addCriterion("tariff_type =", value, "tariff_type");
            return (Criteria) this;
        }

        public Criteria andTariff_typeNotEqualTo(String value) {
            addCriterion("tariff_type <>", value, "tariff_type");
            return (Criteria) this;
        }

        public Criteria andTariff_typeGreaterThan(String value) {
            addCriterion("tariff_type >", value, "tariff_type");
            return (Criteria) this;
        }

        public Criteria andTariff_typeGreaterThanOrEqualTo(String value) {
            addCriterion("tariff_type >=", value, "tariff_type");
            return (Criteria) this;
        }

        public Criteria andTariff_typeLessThan(String value) {
            addCriterion("tariff_type <", value, "tariff_type");
            return (Criteria) this;
        }

        public Criteria andTariff_typeLessThanOrEqualTo(String value) {
            addCriterion("tariff_type <=", value, "tariff_type");
            return (Criteria) this;
        }

        public Criteria andTariff_typeLike(String value) {
            addCriterion("tariff_type like", value, "tariff_type");
            return (Criteria) this;
        }

        public Criteria andTariff_typeNotLike(String value) {
            addCriterion("tariff_type not like", value, "tariff_type");
            return (Criteria) this;
        }

        public Criteria andTariff_typeIn(List<String> values) {
            addCriterion("tariff_type in", values, "tariff_type");
            return (Criteria) this;
        }

        public Criteria andTariff_typeNotIn(List<String> values) {
            addCriterion("tariff_type not in", values, "tariff_type");
            return (Criteria) this;
        }

        public Criteria andTariff_typeBetween(String value1, String value2) {
            addCriterion("tariff_type between", value1, value2, "tariff_type");
            return (Criteria) this;
        }

        public Criteria andTariff_typeNotBetween(String value1, String value2) {
            addCriterion("tariff_type not between", value1, value2, "tariff_type");
            return (Criteria) this;
        }

        public Criteria andTariff_appIsNull() {
            addCriterion("tariff_app is null");
            return (Criteria) this;
        }

        public Criteria andTariff_appIsNotNull() {
            addCriterion("tariff_app is not null");
            return (Criteria) this;
        }

        public Criteria andTariff_appEqualTo(String value) {
            addCriterion("tariff_app =", value, "tariff_app");
            return (Criteria) this;
        }

        public Criteria andTariff_appNotEqualTo(String value) {
            addCriterion("tariff_app <>", value, "tariff_app");
            return (Criteria) this;
        }

        public Criteria andTariff_appGreaterThan(String value) {
            addCriterion("tariff_app >", value, "tariff_app");
            return (Criteria) this;
        }

        public Criteria andTariff_appGreaterThanOrEqualTo(String value) {
            addCriterion("tariff_app >=", value, "tariff_app");
            return (Criteria) this;
        }

        public Criteria andTariff_appLessThan(String value) {
            addCriterion("tariff_app <", value, "tariff_app");
            return (Criteria) this;
        }

        public Criteria andTariff_appLessThanOrEqualTo(String value) {
            addCriterion("tariff_app <=", value, "tariff_app");
            return (Criteria) this;
        }

        public Criteria andTariff_appLike(String value) {
            addCriterion("tariff_app like", value, "tariff_app");
            return (Criteria) this;
        }

        public Criteria andTariff_appNotLike(String value) {
            addCriterion("tariff_app not like", value, "tariff_app");
            return (Criteria) this;
        }

        public Criteria andTariff_appIn(List<String> values) {
            addCriterion("tariff_app in", values, "tariff_app");
            return (Criteria) this;
        }

        public Criteria andTariff_appNotIn(List<String> values) {
            addCriterion("tariff_app not in", values, "tariff_app");
            return (Criteria) this;
        }

        public Criteria andTariff_appBetween(String value1, String value2) {
            addCriterion("tariff_app between", value1, value2, "tariff_app");
            return (Criteria) this;
        }

        public Criteria andTariff_appNotBetween(String value1, String value2) {
            addCriterion("tariff_app not between", value1, value2, "tariff_app");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria implements Serializable {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion implements Serializable {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}